package com.groupbuying.store.service;

import com.groupbuying.store.domain.StoreCapitalVirtualAccountDO;
import com.groupbuying.store.utils.apiresult.ApiResult;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 商户虚拟资金账号
 * 
 * @author wenguoqiang
 * @email 17081@mengtaigroup.com
 * @date 2019-01-24 10:30:45
 */
public interface StoreCapitalVirtualAccountService {
	
	StoreCapitalVirtualAccountDO get(String uuid);
	
	List<StoreCapitalVirtualAccountDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(StoreCapitalVirtualAccountDO storeCapitalVirtualAccount);
	
	int update(StoreCapitalVirtualAccountDO storeCapitalVirtualAccount);
	
	int remove(String uuid);
	
	int batchRemove(String[] uuids);

	/**
	 * 修改金额
	 * @param uuid
	 * @param virtualmoney
	 * @param freezevirtualmoney
	 * @param oldVirtualMoney
	 * @param oldFreezevirtualmoney
	 * @param cashAmount
	 * @param balanceAmount
	 * @param integralAmount
	 * @return
	 */
	int updateMoney(String uuid, BigDecimal virtualmoney, BigDecimal freezevirtualmoney, BigDecimal oldVirtualMoney, BigDecimal oldFreezevirtualmoney,BigDecimal cashAmount,BigDecimal balanceAmount,BigDecimal integralAmount);

	/**
	 * 创建虚拟账户
	 * @param uuid
	 * @param storeno
	 * @param storename
	 * @param mobile
	 * @param storeCapitalVirtualAccount
	 */
	StoreCapitalVirtualAccountDO createStoreVirtualAccount(String uuid, String storeno, String storename, String mobile, StoreCapitalVirtualAccountDO storeCapitalVirtualAccount);

	/**
	 * 根据商户uuid 获取商户虚拟账户
	 * @param storeUuid
	 * @return
	 */
    StoreCapitalVirtualAccountDO getStoreCapitalVirtualAccountByStoreUuid(String storeUuid);

	/**
	 * 处理商户虚拟账户
	 * @param param
	 */
	ApiResult dealStoreVirtualAccount(Map<String, Object> param);

	/**
	 * 查询商户虚拟账户
	 * @param param
	 * @return
	 */
	Object queryStoreVirtualAccountInfo(Map<String, Object> param);

	/**
	 * 冻结或者解冻金额
	 * @param params
	 * @return
	 */
	ApiResult freezeOrUnFreezeVirtualMoney(Map<String, Object> params);

	/**
	 * 提现
	 * @return
	 */
	ApiResult withdraw();

	/**
	 * 提现
	 * @param params
	 * @return
	 */
	ApiResult withdraw(Map<String, Object> params);
	/**
	 * 处理退款
	 * @param params
	 * @return
	 */
	ApiResult dealFreezeVirtulaMoney(Map<String, Object> params);

	/**
	 * 手动提现
	 * @param params
	 * @return
	 */
    ApiResult manualwithdraw(Map<String, Object> params);

    /*虚拟账号支付密码查询*/
	Map virtualAccountPassword(Map<String, Object> params);

	String getAccontPwdByCounterId(String counterId);
}
